package main

import (
	"context"
	"log"
	"os"
	"os/signal"
	"path/filepath"

	"vov.cx/kagura/utils/app"
)

var (
	root = app.New(
		app.Use(filepath.Base(os.Args[0])),
		app.Version("1.0.0"),
		app.Comment("kagura tool"),
	)
)

func main() {
	interrupt, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
	defer cancel()
	log.SetFlags(0)
	app.CheckExit(root.ExecuteContext(interrupt))
}
